package com.dianping.cat.home.router.transform;

import com.dianping.cat.home.router.IVisitor;
import com.dianping.cat.home.router.entity.DefaultServer;
import com.dianping.cat.home.router.entity.Domain;
import com.dianping.cat.home.router.entity.Group;
import com.dianping.cat.home.router.entity.GroupServer;
import com.dianping.cat.home.router.entity.Network;
import com.dianping.cat.home.router.entity.NetworkPolicy;
import com.dianping.cat.home.router.entity.RouterConfig;
import com.dianping.cat.home.router.entity.Server;
import com.dianping.cat.home.router.entity.ServerGroup;


public abstract class BaseVisitor
  implements IVisitor
{
  public void visitDefaultServer(DefaultServer defaultServer) {}

  public void visitDomain(Domain domain) {
/* 21 */     for (Group group : domain.getGroups().values()) {
/* 22 */       visitGroup(group);
    }
  }


  public void visitGroup(Group group) {
/* 28 */     for (Server server : group.getServers()) {
/* 29 */       visitServer(server);
    }
  }



  public void visitGroupServer(GroupServer groupServer) {}



  public void visitNetwork(Network network) {}


  public void visitNetworkPolicy(NetworkPolicy networkPolicy) {
/* 43 */     for (Network network : networkPolicy.getNetworks().values()) {
/* 44 */       visitNetwork(network);
    }
  }


  public void visitRouterConfig(RouterConfig routerConfig) {
/* 50 */     for (DefaultServer defaultServer : routerConfig.getDefaultServers().values()) {
/* 51 */       visitDefaultServer(defaultServer);
    }

/* 54 */     for (NetworkPolicy networkPolicy : routerConfig.getNetworkPolicies().values()) {
/* 55 */       visitNetworkPolicy(networkPolicy);
    }

/* 58 */     for (ServerGroup serverGroup : routerConfig.getServerGroups().values()) {
/* 59 */       visitServerGroup(serverGroup);
    }

/* 62 */     for (Domain domain : routerConfig.getDomains().values()) {
/* 63 */       visitDomain(domain);
    }
  }



  public void visitServer(Server server) {}


  public void visitServerGroup(ServerGroup serverGroup) {
/* 73 */     for (GroupServer groupServer : serverGroup.getGroupServers().values())
/* 74 */       visitGroupServer(groupServer); 
  }
}


/* Location:              /Users/hanfei/Documents/apache-tomcat-9.0.24/webapps/cat/WEB-INF/classes/!/com/dianping/cat/home/router/transform/BaseVisitor.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       1.0.7
 */